// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.worldMap;

import zombie.fileSystem.FileSystem;
import zombie.fileSystem.FileTask;
import zombie.fileSystem.IFileTaskCallback;

public final class FileTask_LoadWorldMapBinary extends FileTask {
    WorldMapData m_worldMapData;
    String m_filename;

    public FileTask_LoadWorldMapBinary(WorldMapData worldMapData, String filename, FileSystem fileSystem, IFileTaskCallback cb) {
        super(fileSystem, cb);
        this.m_worldMapData = worldMapData;
        this.m_filename = filename;
    }

    @Override
    public String getErrorMessage() {
        return this.m_filename;
    }

    @Override
    public void done() {
        this.m_worldMapData = null;
        this.m_filename = null;
    }

    public Object call() throws Exception {
        WorldMapBinary worldMapBinary = new WorldMapBinary();
        return worldMapBinary.read(this.m_filename, this.m_worldMapData) ? Boolean.TRUE : Boolean.FALSE;
    }
}
